package study.alex.resumedb.jdo;

import javax.jdo.annotations.*;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: alex
 * Date: 12.11.13
 * Time: 12:07
 * SVN $Id$
 */


@PersistenceCapable(identityType= IdentityType.APPLICATION, detachable="true")
@Extension(vendorName="DataNucleus", key="mysql-engine-type", value="MyISAM")
public class catalogResume {

    @PrimaryKey
    @Persistent(valueStrategy= IdGeneratorStrategy.INCREMENT)
    private long id;

    @Persistent (defaultFetchGroup = "true")
    private HashSet<Resume> catalog;

    public catalogResume(Collection<Resume> catalog) {
        this.catalog.addAll(catalog);
    }

    public catalogResume() {
        this.catalog = new HashSet<>();
    }

    public Set<Resume> getCatalog() {
        return catalog;
    }
}
